
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module reporting</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>reporting</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/eocasio/proyectos/gae/0.6/0.6/reporting.py">/home/eocasio/proyectos/gae/0.6/0.6/reporting.py</a></font></td></tr></table>
    <p><tt>This&nbsp;module&nbsp;implements&nbsp;a&nbsp;client&nbsp;for&nbsp;the&nbsp;Google&nbsp;Apps&nbsp;Reporting&nbsp;API.<br>
&nbsp;<br>
The&nbsp;Google&nbsp;Apps&nbsp;Reporting&nbsp;API&nbsp;allows&nbsp;domain&nbsp;administrators&nbsp;the&nbsp;ability&nbsp;to<br>
query&nbsp;user&nbsp;behaviour&nbsp;and&nbsp;resource&nbsp;usage&nbsp;for&nbsp;a&nbsp;given&nbsp;time&nbsp;frame.<br>
&nbsp;<br>
The&nbsp;Google&nbsp;Apps&nbsp;Reporting&nbsp;API&nbsp;reference&nbsp;document&nbsp;is&nbsp;at:<br>
&nbsp;<br>
<a href="http://code.google.com/apis/apps/reporting/google_apps_reporting_api.html">http://code.google.com/apis/apps/reporting/google_apps_reporting_api.html</a><br>
&nbsp;<br>
&nbsp;&nbsp;<a href="#ReportRequest">ReportRequest</a>:&nbsp;&nbsp;&nbsp;Encapsulates&nbsp;attribute&nbsp;of&nbsp;a&nbsp;Reporting&nbsp;API&nbsp;request.<br>
&nbsp;&nbsp;<a href="#Error">Error</a>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Base&nbsp;error&nbsp;class.<br>
&nbsp;&nbsp;<a href="#ReportError">ReportError</a>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Error">Error</a>&nbsp;while&nbsp;executing&nbsp;report.<br>
&nbsp;&nbsp;<a href="#ConnectionError">ConnectionError</a>:&nbsp;<a href="#Error">Error</a>&nbsp;during&nbsp;HTTPS&nbsp;connection&nbsp;to&nbsp;a&nbsp;URL.<br>
&nbsp;&nbsp;<a href="#ReportRunner">ReportRunner</a>:&nbsp;&nbsp;&nbsp;&nbsp;Contains&nbsp;the&nbsp;web&nbsp;service&nbsp;calls&nbsp;to&nbsp;run&nbsp;a&nbsp;report.<br>
&nbsp;&nbsp;main():&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Run&nbsp;a&nbsp;report&nbsp;with&nbsp;command-line&nbsp;arguments.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="getopt.html">getopt</a><br>
<a href="re.html">re</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
<a href="time.html">time</a><br>
</td><td width="25%" valign=top><a href="urllib.html">urllib</a><br>
<a href="urllib2.html">urllib2</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="reporting.html#Error">Error</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="reporting.html#ConnectionError">ConnectionError</a>
</font></dt><dt><font face="helvetica, arial"><a href="reporting.html#LoginError">LoginError</a>
</font></dt><dt><font face="helvetica, arial"><a href="reporting.html#ReportError">ReportError</a>
</font></dt></dl>
</dd>
</dl>
</dd>
<dt><font face="helvetica, arial"><a href="reporting.html#ReportRequest">ReportRequest</a>
</font></dt><dt><font face="helvetica, arial"><a href="reporting.html#ReportRunner">ReportRunner</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ConnectionError">class <strong>ConnectionError</strong></a>(<a href="reporting.html#Error">Error</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>URL&nbsp;connection&nbsp;error&nbsp;class.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="reporting.html#ConnectionError">ConnectionError</a></dd>
<dd><a href="reporting.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="ConnectionError-__init__"><strong>__init__</strong></a>(self, url, message)</dt><dd><tt>Initializes&nbsp;the&nbsp;<a href="#Error">Error</a>&nbsp;with&nbsp;a&nbsp;connection&nbsp;specific&nbsp;error&nbsp;message.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="reporting.html#Error">Error</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object at 0xb7ef2920&gt;<dd><tt>T.<a href="#ConnectionError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="ConnectionError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ConnectionError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="ConnectionError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ConnectionError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="ConnectionError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ConnectionError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="ConnectionError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ConnectionError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="ConnectionError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="ConnectionError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#ConnectionError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="ConnectionError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ConnectionError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="ConnectionError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="ConnectionError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#ConnectionError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
<dd><tt>exception&nbsp;message</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Error">class <strong>Error</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Base&nbsp;error&nbsp;class.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="reporting.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object at 0xb7ef2920&gt;<dd><tt>T.<a href="#Error-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
<dd><tt>exception&nbsp;message</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="LoginError">class <strong>LoginError</strong></a>(<a href="reporting.html#Error">Error</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Unable&nbsp;to&nbsp;log&nbsp;in&nbsp;to&nbsp;authentication&nbsp;service.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="reporting.html#LoginError">LoginError</a></dd>
<dd><a href="reporting.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="reporting.html#Error">Error</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="LoginError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#LoginError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object at 0xb7ef2920&gt;<dd><tt>T.<a href="#LoginError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="LoginError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#LoginError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="LoginError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#LoginError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="LoginError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#LoginError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="LoginError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#LoginError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="LoginError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="LoginError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#LoginError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="LoginError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#LoginError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="LoginError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="LoginError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#LoginError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
<dd><tt>exception&nbsp;message</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ReportError">class <strong>ReportError</strong></a>(<a href="reporting.html#Error">Error</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Report&nbsp;execution&nbsp;error&nbsp;class.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="reporting.html#ReportError">ReportError</a></dd>
<dd><a href="reporting.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="ReportError-FromXml"><strong>FromXml</strong></a>(self, xml)</dt><dd><tt>Unmarshall&nbsp;an&nbsp;error&nbsp;from&nbsp;a&nbsp;Reporting&nbsp;API&nbsp;XML&nbsp;rstring.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;xml:&nbsp;Reporting&nbsp;API&nbsp;XML&nbsp;response&nbsp;string.</tt></dd></dl>

<dl><dt><a name="ReportError-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Construct&nbsp;a&nbsp;report&nbsp;execution&nbsp;error.</tt></dd></dl>

<dl><dt><a name="ReportError-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>Override&nbsp;normal&nbsp;string&nbsp;representation&nbsp;with&nbsp;one&nbsp;which&nbsp;includes&nbsp;all&nbsp;the<br>
attributes&nbsp;of&nbsp;a&nbsp;report&nbsp;error.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="reporting.html#Error">Error</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object at 0xb7ef2920&gt;<dd><tt>T.<a href="#ReportError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="ReportError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ReportError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="ReportError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ReportError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="ReportError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ReportError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="ReportError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ReportError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="ReportError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="ReportError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#ReportError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="ReportError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ReportError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="ReportError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
<dd><tt>exception&nbsp;message</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ReportRequest">class <strong>ReportRequest</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>This&nbsp;class&nbsp;encapsulates&nbsp;the&nbsp;attributes&nbsp;of&nbsp;a&nbsp;Reporting&nbsp;API&nbsp;request.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ReportRequest-ToXml"><strong>ToXml</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;XML&nbsp;request&nbsp;for&nbsp;the&nbsp;Reporting&nbsp;API.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Reporting&nbsp;API&nbsp;XML&nbsp;request&nbsp;string.</tt></dd></dl>

<dl><dt><a name="ReportRequest-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Initializes&nbsp;the&nbsp;report&nbsp;request&nbsp;with&nbsp;default&nbsp;values.</tt></dd></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ReportRunner">class <strong>ReportRunner</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>This&nbsp;class&nbsp;contains&nbsp;the&nbsp;logic&nbsp;to&nbsp;generate&nbsp;a&nbsp;report&nbsp;from&nbsp;the&nbsp;Reporting&nbsp;API<br>
web&nbsp;service.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ReportRunner-GetAdminEmailDomain"><strong>GetAdminEmailDomain</strong></a>(self)</dt><dd><tt>Get&nbsp;administrator&nbsp;email&nbsp;adress&nbsp;domain.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;The&nbsp;domain&nbsp;portion&nbsp;of&nbsp;the&nbsp;administrator&nbsp;email&nbsp;address.<br>
&nbsp;&nbsp;e.g.&nbsp;For&nbsp;admin@example.com&nbsp;returns&nbsp;example.com</tt></dd></dl>

<dl><dt><a name="ReportRunner-GetLatestReportDate"><strong>GetLatestReportDate</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;date&nbsp;of&nbsp;the&nbsp;latest&nbsp;available&nbsp;report.<br>
&nbsp;<br>
Reports&nbsp;for&nbsp;the&nbsp;current&nbsp;date&nbsp;are&nbsp;available&nbsp;after&nbsp;12:00&nbsp;PST8PDT&nbsp;the&nbsp;following<br>
day.&nbsp;&nbsp;We&nbsp;calculate&nbsp;and&nbsp;return&nbsp;the&nbsp;date&nbsp;of&nbsp;the&nbsp;latest&nbsp;available&nbsp;report&nbsp;based<br>
on&nbsp;the&nbsp;current&nbsp;time.&nbsp;&nbsp;The&nbsp;PyTZ&nbsp;library&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;calculate&nbsp;this&nbsp;more<br>
accurately,&nbsp;however&nbsp;since&nbsp;it&nbsp;is&nbsp;not&nbsp;part&nbsp;of&nbsp;a&nbsp;standard&nbsp;python&nbsp;installation<br>
we&nbsp;use&nbsp;-0800&nbsp;as&nbsp;an&nbsp;approximation&nbsp;for&nbsp;the&nbsp;PST8PDT&nbsp;timezone.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Latest&nbsp;report&nbsp;date.</tt></dd></dl>

<dl><dt><a name="ReportRunner-GetReportData"><strong>GetReportData</strong></a>(self, report_request)</dt><dd><tt>Get&nbsp;the&nbsp;report&nbsp;data&nbsp;response&nbsp;from&nbsp;the&nbsp;Reporting&nbsp;API&nbsp;web&nbsp;service.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;report_request:&nbsp;Reporting&nbsp;API&nbsp;request.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Report&nbsp;data&nbsp;response&nbsp;as&nbsp;a&nbsp;string.</tt></dd></dl>

<dl><dt><a name="ReportRunner-Login"><strong>Login</strong></a>(self)</dt><dd><tt>Get&nbsp;an&nbsp;authorization&nbsp;token&nbsp;from&nbsp;the&nbsp;Auth&nbsp;URL&nbsp;web&nbsp;service.<br>
&nbsp;<br>
This&nbsp;authorization&nbsp;token&nbsp;is&nbsp;cached&nbsp;in&nbsp;the&nbsp;<a href="#ReportRunner">ReportRunner</a>&nbsp;instance.&nbsp;&nbsp;If&nbsp;a&nbsp;new<br>
token&nbsp;is&nbsp;needed,&nbsp;for&nbsp;example&nbsp;if&nbsp;the&nbsp;token&nbsp;is&nbsp;24&nbsp;hours&nbsp;old,&nbsp;then&nbsp;call&nbsp;this<br>
method&nbsp;again&nbsp;to&nbsp;get&nbsp;a&nbsp;new&nbsp;token.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;<a href="#ConnectionError">ConnectionError</a>:&nbsp;When&nbsp;a&nbsp;connection&nbsp;error&nbsp;occurs&nbsp;and&nbsp;in&nbsp;particular<br>
&nbsp;&nbsp;&nbsp;&nbsp;when&nbsp;the&nbsp;credentials&nbsp;are&nbsp;incorrect.<br>
&nbsp;&nbsp;<a href="#LoginError">LoginError</a>:&nbsp;When&nbsp;authentication&nbsp;service&nbsp;does&nbsp;not&nbsp;return&nbsp;a&nbsp;SID&nbsp;token.</tt></dd></dl>

<dl><dt><a name="ReportRunner-RunReport"><strong>RunReport</strong></a>(self, report_name, report_date, out_file_name<font color="#909090">=None</font>)</dt><dd><tt>Run&nbsp;the&nbsp;named&nbsp;report&nbsp;for&nbsp;the&nbsp;given&nbsp;day&nbsp;and&nbsp;write&nbsp;to&nbsp;the&nbsp;output&nbsp;file.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;report_name:&nbsp;Name&nbsp;of&nbsp;the&nbsp;report&nbsp;to&nbsp;run.<br>
&nbsp;&nbsp;report_date:&nbsp;Run&nbsp;the&nbsp;report&nbsp;for&nbsp;this&nbsp;day.<br>
&nbsp;&nbsp;out_file_name:&nbsp;Write&nbsp;the&nbsp;report&nbsp;data&nbsp;to&nbsp;this&nbsp;file&nbsp;(optional).</tt></dd></dl>

<dl><dt><a name="ReportRunner-WriteReport"><strong>WriteReport</strong></a>(self, response, out_file_name<font color="#909090">=None</font>)</dt><dd><tt>Print&nbsp;the&nbsp;report&nbsp;response&nbsp;to&nbsp;either&nbsp;standard&nbsp;output&nbsp;or&nbsp;a&nbsp;file.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;response:&nbsp;Report&nbsp;data&nbsp;response.<br>
&nbsp;&nbsp;out_file_name:&nbsp;Output&nbsp;file&nbsp;name&nbsp;(optional).</tt></dd></dl>

<dl><dt><a name="ReportRunner-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Construct&nbsp;an&nbsp;instance&nbsp;of&nbsp;the&nbsp;report&nbsp;runner.</tt></dd></dl>

</td></tr></table></td></tr></table>
</body></html>